
include(src/qextserialport.pri)


##include  "SerialPort.h"

#SerialPort *serialPort = new SerialPort;
#connect(serialPort, SIGNAL(newDataReceived(const QByteArray &)), this, SLOT(slot_newDataReceived(const QByteArray &)));

#void MainWindow::openCom()
#{
#    if (serialPort->isOpen())
#        serialPort->close();

#    //Settings parameters
#    serialPort->setPort("/dev/ttyS3"); //Port
#    serialPort->setBaudRate(BAUD115200); //BaudRate
#    serialPort->setDataBits(DATA_8); //DataBits
#    serialPort->setParity(PAR_NONE); //Parity
#    serialPort->setStopBits(STOP_1); //StopBits
#    serialPort->setFlowControl(FLOW_OFF); //FlowControl

#    serialPort->setTimeout(10);
#    serialPort->enableSending();
#    serialPort->enableReceiving();

#    bool ret = serialPort->open();
#    serialPort->receiveData();

#qDebug()<<__FUNCTION__<<ret;

#//    m_timer_ack->start();
#}

#void MainWindow::closeCom()
#{
#//    m_timer_ack->stop();

#    serialPort->close();
#}


#bool MainWindow::sendBuffer(QByteArray buffer, QString tips, bool display)
#{
#    serialPort->sendData(buffer);

#    return true;
#}
